﻿<div ng-controller="weixinPortalController">
    <ol class="breadcrumb pull-right">
        <li><a ui-sref="app.home">汇票线</a></li>
        <li><a ui-sref="app.portal">网站信息</a></li>
        <li class="active">订阅号热门资讯</li>
    </ol>
    <h1 class="page-header"><i class="fa fa-lg text-success fa-fax"></i>订阅号热门资讯</h1>
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
                    </div>
                    <h4 class="panel-title">订阅号热门资讯</h4>
                </div>
                <div class="panel-body">
                    <div class="form-inline filter-option">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="pull-right">
                                    <input type="text" ng-model="filter.keyword" class="form-control input-sm" placeholder="关键字" />
                                    <button class="btn btn-sm btn-primary" ng-click="reflash()"><i class="fa fa-search"></i> 筛选</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <table id="data-table" ng-table="tableParams" template-pagination="template/pagination.html" class="table table-striped table-bordered table-hover table-condensed">
                        <tr ng-repeat="item in $data">
                            <td data-title="'序号'" width="5%" class="text-center">{{ first + $index }}</td>
                            <td data-title="'信息标题'" class="text-left">{{ item.title }}</td>
                            <td data-title="'发布时间'" sortable="'publishing_time'" class="text-center">{{ item.publishing_time | date:'yyyy-MM-dd HH:mm:ss' }}</td>
                            <td data-title="'操作'" class="text-center width-100 text-nowrap">
                                <button class="btn btn-success btn-xs" ng-click="edit(item)"><i class="fa fa-edit"></i> 修改</button>
                            </td>
                        </tr>
                    </table>
                    <div class="modal fade" id="modal-edit">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <ng-form name="editForm" novalidate>
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                        <h4 class="modal-title"><i class="fa fa-lg fa-edit text-success"></i>订阅号热门资讯</h4>
                                    </div>
                                    <div class="modal-body">
                                        <div class="form-horizontal form-inline">
                                            <div class="form-group width-full" ng-class="{ 'has-error': editForm.title.$invalid && !editForm.title.$pristine }">
                                                <label class="col-md-2 control-label"> 资讯标题: </label>
                                                <div class="col-md-9">
                                                    <input type="text" name="title" ng-model="model.title" class="form-control width-full" />
                                                </div>
                                            </div>
                                            <div class="form-group width-full" style="margin-top:5px;">
                                                <label class="col-md-2 control-label"> 资讯链接: </label>
                                                <div class="col-md-9">
                                                    <input type="text" name="detail" ng-model="model.detail" class="form-control width-full" />
                                                </div>
                                            </div>
                                            <div class="form-group width-full" style="margin-top:5px;">
                                                <label class="col-md-2 control-label"> 资讯显示顺序: </label>
                                                <select ng-model="model.main_keyword" class="col-md-3 form-control" style="margin-left:15px;">
                                                    <option value="">显示顺序...</option>
                                                    <option value="1">第一</option>
                                                    <option value="2">第二</option>
                                                    <option value="3">第三</option>
                                                    <option value="4">第四</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="submit" class="btn btn-sm btn-success" ng-click="save()" ng-disabled="editForm.$invalid"><i class="fa fa-save"></i> 保存</button>
                                        <button type="button" class="btn btn-sm btn-white" data-dismiss="modal"><i class="fa fa-share-square-o"></i> 放弃</button>
                                    </div>
                                </ng-form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

